/*******************************************************************************
  * Copyright(c) 2023 Levetop Semiconductor Co.,Led. All rights reserved.
  * @file     uiCounter.h
  * @author   UartTFT Application Team
  * @version  V0.0.1
  * @date     2023-01-04
  * @brief    This file contains the functions prototypes for the UartTFT
  *           Application display firmware.
 ********************************************************************************/

#ifndef UICOUNTER_H_
#define UICOUNTER_H_
#include "type.h"
#include "module_select.h"


/*time couonter*/
typedef struct
{
	uint16_t v_add;
	uint16_t t_add;
	uint16_t c_add;
	uint16_t x;
	uint16_t y;
	uint16_t ID_start;
	uint8_t dis_mode;
	uint8_t dir;
	uint8_t end_mode;
	uint8_t end_feedback;
	uint16_t var_addr[8];
	uint16_t var[8];
	uint16_t last_w;
} Count_Info;
//extern Count_Info gCount_Info[];
typedef struct
{
	uint16_t v_add;
	uint16_t t_add;
	uint16_t c_add;
	uint8_t dir;
	uint8_t end_feedback;
	uint16_t var_addr[8];
	uint16_t var[8];
} Record_count_Info;
//extern Record_count_Info gRecord_count_Info[];

extern Count_Info gCount_Info[COUNT_SIZE];
extern Record_count_Info gRecord_count_Info[20];
extern uint8_t Count_sum;
extern uint8_t Count_flag;
extern uint8_t Record_count;
extern uint16_t Count_reg[8];
extern uint8_t Count_reg_num;

extern void show_Count(void);
extern void count_display(uint8_t type, uint8_t *buff);
extern uint8_t Display_Count(uint8_t i);
extern void Saving_counting_parameters(void);

#endif /* UICOUNTER_H_ */
